﻿using System;

namespace JZ_64_qiu_12n_lcof
{
    class Program
    {
        static void Main (string[] args)
        {
            Console.WriteLine (SumNums(10));
        }

        private static int sum = 0;
        public static int SumNums (int n)
        {
            result (n);
            return sum;
        }

        public static bool result (int n)
        {
            sum += n;
            return n == 0 || result (n - 1);
        }
    }
}
